Integrand size = 27, antiderivative size = 219 \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\frac {(4 c e f-4 c d g+b e g+2 c e g x) \sqrt {a+b x+c x^2}}{4 c e^2}-\frac {\left (b^2 e^2 g+8 c^2 d (e f-d g)-4 c e (b e f-b d g+a e g)\right ) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{8 c^{3/2} e^3}+\frac {\sqrt {c d^2-b d e+a e^2} (e f-d g) \text {arctanh}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{e^3} \]
[Out]
Time = 0.19 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {828, 857, 635, 212, 738} \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=-\frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-4 c e (a e g-b d g+b e f)+b^2 e^2 g+8 c^2 d (e f-d g)\right )}{8 c^{3/2} e^3}+\frac {(e f-d g) \sqrt {a e^2-b d e+c d^2} \text {arctanh}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{e^3}+\frac {\sqrt {a+b x+c x^2} (b e g-4 c d g+4 c e f+2 c e g x)}{4 c e^2} \]
[In]
[Out]
Rule 212
Rule 635
Rule 738
Rule 828
Rule 857
Rubi steps \begin{align*} \text {integral}& = \frac {(4 c e f-4 c d g+b e g+2 c e g x) \sqrt {a+b x+c x^2}}{4 c e^2}-\frac {\int \frac {\frac {1}{2} (4 c e (b d-2 a e) f+4 a c d e g-b d (4 c d-b e) g)+\frac {1}{2} \left (b^2 e^2 g+8 c^2 d (e f-d g)-4 c e (b e f-b d g+a e g)\right ) x}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{4 c e^2} \\ & = \frac {(4 c e f-4 c d g+b e g+2 c e g x) \sqrt {a+b x+c x^2}}{4 c e^2}+\frac {\left (\left (c d^2-b d e+a e^2\right ) (e f-d g)\right ) \int \frac {1}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{e^3}-\frac {\left (b^2 e^2 g+8 c^2 d (e f-d g)-4 c e (b e f-b d g+a e g)\right ) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{8 c e^3} \\ & = \frac {(4 c e f-4 c d g+b e g+2 c e g x) \sqrt {a+b x+c x^2}}{4 c e^2}-\frac {\left (2 \left (c d^2-b d e+a e^2\right ) (e f-d g)\right ) \text {Subst}\left (\int \frac {1}{4 c d^2-4 b d e+4 a e^2-x^2} \, dx,x,\frac {-b d+2 a e-(2 c d-b e) x}{\sqrt {a+b x+c x^2}}\right )}{e^3}-\frac {\left (b^2 e^2 g+8 c^2 d (e f-d g)-4 c e (b e f-b d g+a e g)\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{4 c e^3} \\ & = \frac {(4 c e f-4 c d g+b e g+2 c e g x) \sqrt {a+b x+c x^2}}{4 c e^2}-\frac {\left (b^2 e^2 g+8 c^2 d (e f-d g)-4 c e (b e f-b d g+a e g)\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{8 c^{3/2} e^3}+\frac {\sqrt {c d^2-b d e+a e^2} (e f-d g) \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{e^3} \\ \end{align*}
Time = 0.88 (sec) , antiderivative size = 212, normalized size of antiderivative = 0.97 \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\frac {2 \sqrt {c} \left (e \sqrt {a+x (b+c x)} (b e g+2 c (2 e f-2 d g+e g x))-8 c \sqrt {-c d^2+b d e-a e^2} (-e f+d g) \arctan \left (\frac {\sqrt {c} (d+e x)-e \sqrt {a+x (b+c x)}}{\sqrt {-c d^2+e (b d-a e)}}\right )\right )+\left (-b^2 e^2 g+8 c^2 d (-e f+d g)+4 c e (b e f-b d g+a e g)\right ) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+x (b+c x)}}\right )}{8 c^{3/2} e^3} \]
[In]
[Out]
Time = 0.72 (sec) , antiderivative size = 335, normalized size of antiderivative = 1.53
method | result | size |
risch | \(\frac {\left (2 c e g x +b e g -4 c d g +4 c e f \right ) \sqrt {c \,x^{2}+b x +a}}{4 c \,e^{2}}+\frac {\frac {\left (4 a c \,e^{2} g -b^{2} e^{2} g -4 b c d e g +4 b c \,e^{2} f +8 c^{2} d^{2} g -8 c^{2} d e f \right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{e \sqrt {c}}+\frac {8 \left (a \,e^{2} g d -a \,e^{3} f -b \,d^{2} e g +b \,e^{2} f d +c \,d^{3} g -c \,d^{2} e f \right ) c \ln \left (\frac {\frac {2 e^{2} a -2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}}{8 c \,e^{2}}\) | \(335\) |
default | \(\frac {g \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )}{e}+\frac {\left (-d g +e f \right ) \left (\sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}+\frac {\left (b e -2 c d \right ) \ln \left (\frac {\frac {b e -2 c d}{2 e}+c \left (x +\frac {d}{e}\right )}{\sqrt {c}}+\sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\right )}{2 e \sqrt {c}}-\frac {\left (e^{2} a -b d e +c \,d^{2}\right ) \ln \left (\frac {\frac {2 e^{2} a -2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}\right )}{e^{2}}\) | \(407\) |
[In]
[Out]
Timed out. \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\int \frac {\left (f + g x\right ) \sqrt {a + b x + c x^{2}}}{d + e x}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Exception generated. \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\int \frac {\left (f+g\,x\right )\,\sqrt {c\,x^2+b\,x+a}}{d+e\,x} \,d x \]
[In]
[Out]